package com.yd.app.service.pc.gStyleService;

import com.yd.app.mapper.GStyleMapper;
import com.yd.app.service.common.BaseService;
import com.yd.domain.business.GStyle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 产品样式Service
 * Created by sunxianhui on 2018/3/9.
 */
@Service
public class GStyleService extends BaseService {
    @Autowired
    GStyleMapper gStyleMapper;

    /**
     * 添加产品样式
     *
     * @param gStyle
     */
    public int addGStyle(GStyle gStyle) {
        return gStyleMapper.addGStyle(gStyle);
    }

    /**
     * 修改
     *
     * @param gStyle
     */
    public void updateGStyle(GStyle gStyle) {
        gStyleMapper.updateGStyle(gStyle);
    }

    /**
     * 删除
     *
     * @param id
     */
    public void deleteGStyleByid(String id) {
        gStyleMapper.deleteGStyleById(id);
    }

    /**
     * 根据条件分页查询
     * @return
     */
    public  List<GStyle> getGStyleList() {
        List<GStyle> list = new ArrayList<>();
        list= gStyleMapper.getGStyleList();
        return list;
    }
}